<?php echo $this->Html->css(array('users.login','form','search-left','lastminute-left'),null,array('inline'=>false));?>
<div class="content">
	<div class="left-column">
		<?php echo $this->Yachts->search_form_left();?>		
		<div class="clr"></div>	
		<?php echo $this->Yachts->lastminute(2);?>
		<div class="clr"></div>	
		
	</div>
		
	<div class="right-column main-column">
		<?php //echo $this->element('baner-welcome'); ?>
		<div class="clr"></div>
	
		<div class="box corners" >
			<?php if($session->check('Auth.User.id')){?>
			<h2><?php __("Loged Customer")?></h2>
			<?php echo $this->Form->create('User',array('url'=>array('plugin'=>false,'controller'=>'users','action'=>'welcome')));?>
			<table width="100%" style="padding-top:0px; margin: 0px;" cellpadding="0" cellspacing="0">
				<tr>
					<td align="left" valign="top" style="padding-top:0px; margin: 0px;">
						<?php echo $this->Form->hidden('registred'); ?>
						<?php echo $this->data['User']['first_name']; ?> 
						<?php echo $this->data['User']['last_name']; ?><br/>
						<?php echo $this->data['User']['address1']; ?><br/>
						<?php echo $this->data['User']['address2']; ?><br/>
						<?php echo $this->data['User']['address3']; ?><br/>
						<?php echo $this->data['User']['address4']; ?><br/>							
						<?php echo $this->Country->name($this->data['User']['address5']);	?>

					</td>
				</tr>
			</table>
			<?php echo $this->Form->end('Submit');?>
			
			<?php }else{?>
	
			<table width="100%" style="padding-top:0px; margin: 0px;" cellpadding="0" cellspacing="0">
				<tr>
					<td align="left" valign="top" style="padding-top:0px; margin: 0px;" width="48%">
						<h2><?php echo __('New Customer')?></h2>
						<?php echo $this->Form->create('User',array('url'=>array('controller'=>'users','action'=>'welcome')));?>
						<h3><?php __('Your Personal Information')?></h3>
						<?php
							echo $this->Form->hidden('id');
							echo $this->Form->hidden('user_id');
							echo $this->Form->input('first_name',array('label'=>__("First Name",true).'<span class="required">*</span>','error'=>__('Please write First Name',true)));
							echo $this->Form->input('last_name',array('label'=>__("Last Name",true).'<span class="required">*</span>','error'=>__('Please write Last Name',true)));
							//echo $this->Form->input('address1',array('label'=>__("Address",true),'error'=>__('Please write Address',true)));
							//echo $this->Form->input('address2',array('label'=>__("Address",true)));
							//echo $this->Form->input('address3',array('label'=>__("City",true)));
							//echo $this->Form->input('address4',array('label'=>__("Zip Code",true)));
							//echo $this->Country->selectbox('User.delivery_address5');
						?>
						
						<h3><?php __('Account information')?></h3>
						<?php
							echo $this->Form->input('email',array('label'=>__("E-mail",true).'<span class="required">*</span>'));
							echo $this->Form->input('user_password',array('label'=>__("Password",true).'<span class="required">*</span>','type'=>'password'));
							echo $this->Form->input('confirm_password',array('type'=>'password','label'=>__("Confirm password",true).'<span class="required">*</span>'));
						?>
						
						
						<?php echo $html->image('/captcha/captcha/image', array('escape'=>false));?>
						<?php echo $form->input('captcha', array('label' => __('type the numbers from image',true).'<span class="required">*</span> ','style'=>'width:50px;','maxlength'=>3));?>
											
												
						<?php echo $this->Form->end(__('Submit',true));?>
					</td>
					<td style="width: 2%"> </td>
					<td align="left" valign="top" style="padding-top:0px; margin: 0px;" width="48%">
						<h2><?php echo __('Returning customers',true)?></h2>
						<?php
							echo $this->Form->create('User', array('url' => array('plugin'=>false,'controller' => 'users', 'action' =>'login','booking:1')));
						?>
						<?php 
							echo $this->Form->input('User.email');
							echo $this->Form->input('User.password');
							?>
							<?php 
							echo $html->link(__("Forgot your password?",true),array('controller'=>'users','action'=>'new_password',$this->data['User']['id']));
						?>
						<?php echo $this->Form->end(__("Login", true));?>
					</td>
				</tr>
			</table>		
	
			<?php }?>				

			<div class="clr"></div> 
		</div>
		<div class="clr"></div>

	</div>
</div>
<div class="clr"></div>